Combining Monads
نویسندگان
چکیده
Monads provide a way of structuring functional programs. Most real applications require a combination of primitive monads. Here we describe how some monads may be combined with others to yield a combined monad.
منابع مشابه
Iterated distributive laws
We give a framework for combining n monads on the same category via distributive laws satisfying Yang-Baxter equations, extending the classical result of Barr and Wells which combines two monads via one distributive law. We show that this corresponds to iterating n-times the process of taking the 2-category of monads in a 2-category, extending the result of Street characterising distributive la...
متن کاملLeibniz’s Monads and Mulla Sadra’s Hierarchy of Being: A Comparative Study
Mulla Sadra and Leibniz, the two philosophers from the East and the West, belong to two different worlds. Though they were unaware of the ideas of each other, their philosophical systems share certain common points that are comparable. Monads constitute the basis of Leibniz's thought and he refers to their features in his various works. On the other side, Mulla Sadra's philosophy is also based ...
متن کاملMonad Combinators, Non-Determinism and Probabilistic Choice
We test Lüth and Ghani’s proposal [11, 12, 13] to use coproducts of monads as a basis for modularity by applying their ideas to Varacca’s work [20] on combining non-determinism and probabilistic choice. In particular, we discuss i) the coproduct of non-determinism and probabilistic choice; ii) how monad compositions based upon distributivity possess a universal property; and iii) Capretta’s [4]...
متن کاملLayer by layer - Combining Monads
We develop a method to incrementally construct programming languages. Our approach is categorical: each layer of the language is described as a monad. Our method either (i) concretely builds a distributive law between two monads, i.e. layers of the language, which then provides a monad structure to the composition of layers, or (ii) identifies precisely the algebraic obstacles to the existence ...
متن کاملMonad-Independent Hoare Logic in HASCASL
Monads have been recognized by Moggi as an elegant device for dealing with stateful computation in functional programming languages. It is thus natural to develop a Hoare calculus for reasoning about computational monads. While this has previously been done only for the state monad, we here provide a generic, monad-independent approach, which applies also to further computational monads such as...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1992